#include "SparkEditorMenuView.h"


SparkEditorMenuView::SparkEditorMenuView()
{
	// Explorer
	wxMenuItem* newExplorer = new wxMenuItem(this, IDMENU_VIEW_EXPLORER, wxT("&Explorer"), wxT("Toggle Explorer Panel"), wxITEM_NORMAL);
	wxBitmap newExplorerBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/scene.png"));
	newExplorer->SetBitmap(newExplorerBitmap);
	this->Append(newExplorer);

	// Files
	wxMenuItem* newFiles = new wxMenuItem(this, IDMENU_VIEW_FILES, wxT("&Files"), wxT("Toggle Project Files Panel"), wxITEM_NORMAL);
	wxBitmap newFilesBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/files.png"));
	newFiles->SetBitmap(newFilesBitmap);
	this->Append(newFiles);

	// Groups
	wxMenuItem* newGroups = new wxMenuItem(this, IDMENU_VIEW_GROUPS, wxT("&Groups"), wxT("Toggle Groups Panel"), wxITEM_NORMAL);
	wxBitmap newGroupsBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/visibility.png"));
	newGroups->SetBitmap(newGroupsBitmap);
	this->Append(newGroups);

	// Properties
	wxMenuItem* newProperties = new wxMenuItem(this, IDMENU_VIEW_PROPERTIES, wxT("&Properties"), wxT("Toggle Properties Panel"), wxITEM_NORMAL);
	wxBitmap newPropertiesBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/properties.png"));
	newProperties->SetBitmap(newPropertiesBitmap);
	this->Append(newProperties);

	// Tools
	wxMenuItem* newTools = new wxMenuItem(this, IDMENU_VIEW_TOOLS, wxT("&Tools"), wxT("Toggle Tools Panel"), wxITEM_NORMAL);
	wxBitmap newToolsBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/objects.png"));
	newTools->SetBitmap(newToolsBitmap);
	this->Append(newTools);

	// Resources
	wxMenuItem* newResources = new wxMenuItem(this, IDMENU_VIEW_RESOURCES, wxT("&Resources"), wxT("Toggle Resources Panel"), wxITEM_NORMAL);
	wxBitmap newResourcesBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/entity.png"));
	newResources->SetBitmap(newResourcesBitmap);
	this->Append(newResources);

	// Messages
	wxMenuItem* newMessages = new wxMenuItem(this, IDMENU_VIEW_MESSAGES, wxT("&Messages"), wxT("Toggle Messages"), wxITEM_NORMAL);
	wxBitmap newMessagesBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/messages.png"));
	newMessages->SetBitmap(newMessagesBitmap);
	this->Append(newMessages);

	// Separator
	this->AppendSeparator();

	// Grid
	wxMenuItem* newGrid = new wxMenuItem(this, IDMENU_VIEW_GRID, wxT("&Grid"), wxT("Show/Hide Grid"), wxITEM_NORMAL);
	wxBitmap newGridBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/grid.png"));
	newGrid->SetBitmap(newGridBitmap);
	this->Append(newGrid);

	// ToolBar
	wxMenuItem* newToolBar = new wxMenuItem(this, IDMENU_VIEW_TOOLBAR, wxT("&ToolBar"), wxT("Toggle ToolBar"), wxITEM_NORMAL);
	wxBitmap newToolBarBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/toolbar.png"));
	newToolBar->SetBitmap(newToolBarBitmap);
	this->Append(newToolBar);

	// Fullscreen
	wxMenuItem* newFullscreen = new wxMenuItem(this, IDMENU_VIEW_FULLSCREEN, wxT("&Fullscreen"), wxT("Fullscreen"), wxITEM_NORMAL);
	wxBitmap newFullscreenBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/fullscreen.png"));
	newFullscreen->SetBitmap(newFullscreenBitmap);
	this->Append(newFullscreen);

	// Super Fullscreen
	wxMenuItem* newSuperFullscreen = new wxMenuItem(this, IDMENU_VIEW_SUPER_FULLSCREEN, wxT("&Super Fullscreen"), wxT("Super Fullscreen"), wxITEM_NORMAL);
	wxBitmap newSuperFullscreenBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/fullscreen_super.png"));
	newSuperFullscreen->SetBitmap(newSuperFullscreenBitmap);
	this->Append(newSuperFullscreen);

	// Separator
	this->AppendSeparator();

	// Load Layout
	wxMenuItem* newLoadLayout = new wxMenuItem(this, IDMENU_VIEW_LOAD_LAYOUT, wxT("&Load Layout"), wxT("Load Layout from File"), wxITEM_NORMAL);
	wxBitmap newLoadLayoutBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/fileopen.png"));
	newLoadLayout->SetBitmap(newLoadLayoutBitmap);
	this->Append(newLoadLayout);

	// Save Layout
	wxMenuItem* newSaveLayout = new wxMenuItem(this, IDMENU_VIEW_SAVE_LAYOUT, wxT("&Save Layout"), wxT("Save Current Layout to File"), wxITEM_NORMAL);
	wxBitmap newSaveLayoutBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/filesave.png"));
	newSaveLayout->SetBitmap(newSaveLayoutBitmap);
	this->Append(newSaveLayout);

	// Separator
	this->AppendSeparator();

	// Hide MenuBar
	wxMenuItem* newHideMenuBar = new wxMenuItem(this, IDMENU_VIEW_HIDE_MENUBAR, wxT("&Hide MenuBar"), wxT("Hide the menu bar and show as icon in the toolbar"), wxITEM_NORMAL);
	this->Append(newHideMenuBar);
}

SparkEditorMenuView::~SparkEditorMenuView()
{

}

void SparkEditorMenuView::ConnectEvent(void)
{
	Connect(IDMENU_VIEW_EXPLORER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewExplorer));
	Connect(IDMENU_VIEW_FILES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewFiles));
	Connect(IDMENU_VIEW_GROUPS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewGroups));
	Connect(IDMENU_VIEW_PROPERTIES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewProperties));
	Connect(IDMENU_VIEW_TOOLS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewTools));
	Connect(IDMENU_VIEW_RESOURCES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewResources));
	Connect(IDMENU_VIEW_MESSAGES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewMessages));
	Connect(IDMENU_VIEW_GRID, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewGrid));
	Connect(IDMENU_VIEW_TOOLBAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewToolBar));
	Connect(IDMENU_VIEW_FULLSCREEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewFullscreen));
	Connect(IDMENU_VIEW_SUPER_FULLSCREEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewSuperFullscreen));
	Connect(IDMENU_VIEW_LOAD_LAYOUT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewLoadLayout));
	Connect(IDMENU_VIEW_SAVE_LAYOUT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewSaveLayout));
	Connect(IDMENU_VIEW_HIDE_MENUBAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuView::OnViewHideMenuBar));

}

void SparkEditorMenuView::OnViewExplorer(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewFiles(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewGroups(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewProperties(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewTools(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewResources(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewMessages(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewGrid(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewToolBar(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewFullscreen(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewSuperFullscreen(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewLoadLayout(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewSaveLayout(wxCommandEvent& event)
{

}

void SparkEditorMenuView::OnViewHideMenuBar(wxCommandEvent& event)
{

}


